<template>
  <div class="container">
    <el-row :gutter="20">
      <el-col :span="12">
        <el-card class="retail-card" @click="goToOut">
          <div class="card-content">
            <div class="icon-wrapper">
              <el-icon size="48" color="#409EFF">
                <ShoppingCart />
              </el-icon>
            </div>
            <div class="text-content">
              <h3>零售出库</h3>
              <p>用于非会员和会员的单据录入，主要是用于散户使用，不能欠款</p>
            </div>
          </div>
        </el-card>
      </el-col>
      <el-col :span="12">
        <el-card class="retail-card" @click="goToReturn">
          <div class="card-content">
            <div class="icon-wrapper">
              <el-icon size="48" color="#F56C6C">
                <RefreshLeft />
              </el-icon>
            </div>
            <div class="text-content">
              <h3>零售退货</h3>
              <p>用于零售出库单据的退货。零售退货单可以由零售出库单转过来，也可以单独创建</p>
            </div>
          </div>
        </el-card>
      </el-col>
    </el-row>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'
import { ShoppingCart, RefreshLeft } from '@element-plus/icons-vue'

const router = useRouter()

const goToOut = () => {
  router.push('/retail/out')
}

const goToReturn = () => {
  router.push('/retail/return')
}
</script>

<style scoped lang="less">
.container {
  padding: 20px;
  
  .retail-card {
    cursor: pointer;
    transition: all 0.3s;
    height: 200px;
    
    &:hover {
      transform: translateY(-5px);
      box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    }
    
    .card-content {
      display: flex;
      align-items: center;
      height: 100%;
      
      .icon-wrapper {
        margin-right: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 80px;
        height: 80px;
        border-radius: 50%;
        background: #f5f7fa;
      }
      
      .text-content {
        flex: 1;
        
        h3 {
          margin: 0 0 10px 0;
          font-size: 20px;
          font-weight: 600;
          color: #303133;
        }
        
        p {
          margin: 0;
          color: #606266;
          line-height: 1.6;
          font-size: 14px;
        }
      }
    }
  }
}
</style> 